<div>
    <div class="modal-header">
        <button class="close" data-dismiss="modal" ng-click="cancel()" title="Đóng">×</button>
        <h4 class="modal-title">Thêm đạo diễn</h4>
    </div>
    <div class="modal-body">
        <div class="row">
            <div class="col-xs-12">
                <div class="row">
                    <div class="col-xs-12">
                        {{ form('class': 'forms-horizontal' , 'id' : 'formSearchSelectAddDirector') }}
                        <div class="col-md-11">
                            <div class="form-group">
                                <div class="col-md-3">
                                    {{ text_field('id' , 'class' :'forms-control col-xs-12' , 'placeholder' : 'id') }}
                                    {{ hiddenField( ['artist_type','value': artistType]) }}
                                </div>
                                <div class="col-md-3">
                                    {{ formSearchArtist.render('name' , ['placeholder' : 'Tên đạo diễn']) }}
                                </div>
                                <div class="col-md-3">
                                    {{ formSearchArtist.render('national_id') }}
                                </div>
                                <div class="col-md-3">
                                    {{ formSearchArtist.render('gender') }}
                                </div>
                            </div>
                        </div>
                        <div class="col-md-1">
                            <button type="button" class="btn btn-xs btn-default btnSeachArtist"">Tìm</button>
                        </div>
                        {{ end_form() }}
                    </div>
                </div>
                {{ form(config.application.backendUrl ~ '/video/group/edit/' ~ videoGroupId ~ '?tab=director' , 'class': 'forms-horizontal' , 'id' : 'formSelectDirectorToGroupVideo') }}
                <div id="listSelectDirectorsToGroupVideo">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <th class="center">
                                <label class="position-relative">
                                    <input type="checkbox" class="ace checkSelectDirectorAll">
                                    <span class="lbl"></span>
                                </label>
                            </th>
                            <th>Hình ảnh</th>
                            <th>Tên</th>
                            <td>Quốc tịch</td>
                            <td>Giới tính</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for item in pager  %}
                            <tr>
                                <td class="center">
                                    <label class="position-relative">
                                        <input type="checkbox" class="ace selectArtist" name="selectArtist[]" value="{{ item.getId() }}">
                                        <span class="lbl"></span>
                                    </label>
                                </td>
                                <td>

                                </td>
                                <td>{{ item.getName() }}</td>
                                <td>{{ item.getNational().getName() }}</td>
                                <td>{{ helper.getGender(item.getGender()) }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                    {% if pager.haveToPaginate() %}
                        {# Render the navigation #}
                        {{ pager.getLayout() }}
                    {% endif %}
                </div>
                {{ hiddenField( ['video_group_id','value': videoGroupId]) }}
                {{ hiddenField( ['artist_type','value': artistType]) }}
                {{ formSearchArtist.render('csrf', ['value': security.getToken()]) }}
                {{ end_form() }}
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Đóng</button>
        <button type="button" data-loading-text="<i class='ace-icon fa fa-spinner fa-spin white bigger-125'></i>Đang tải..." class="btn btn-primary btnAddDirectorToGroupVideo">Thêm</button>
    </div>
</div>
